package kr.pe.johnkim.carrotpoint.mobile.dao;

import kr.pe.johnkim.carrotpoint.mobile.domain.HelloWorldDomain;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.stereotype.Repository;

/**
 * 테스트용 Implementation 클래스이다.
 *
 * @author : johnkim <cale9797@gmail.com / Bettersoft, Inc.>
 * @date: 12. 12. 31.
 */
@Repository
public class HelloWorldDaoImpl implements HelloWorldDao {

    // SLF4J Logging
    private Logger logger = LoggerFactory.getLogger(HelloWorldDaoImpl.class);

    /**
     * Hello 정보를 가져 온다.
     *
     * @param name
     * @return
     */
    public HelloWorldDomain getHello(String name) {
        logger.info("getHello");
        return getDummy();
    }

    public HelloWorldDomain getDummy() {
        HelloWorldDomain hello = new HelloWorldDomain();
        hello.setAddress("경기도 정자");
        hello.setName("김준우");
        hello.setTelephoneNumber("010-9999-8888");

        logger.info("address         : {}", hello.getAddress());
        logger.info("name            : {}", hello.getName());
        logger.info("telephoneNumber : {}", hello.getTelephoneNumber());

        return hello;
    }
}
